﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CodeStash.Common.DataAccess.UnitOfWork;
using System.Data.Entity;
using System.Linq.Expressions;

namespace CodeStash.Common.DataAccess.Repository
{
    public interface IRepository<T> where T : class
    {
        void EnrolInUnitOfWork(IUnitOfWork unitOfWork);
        int Count { get; }
        void Add(T item);
        bool Contains(T item);
        void Remove(T item);
        IQueryable<T> FindAll();
        IQueryable<T> FindAll(string lazyIncludeStrings);
        IQueryable<T> FindBy(Func<T, bool> predicate);
        IQueryable<T> FindByExp(Expression<Func<T, bool>> predicate);
        IQueryable<T> FindBy(Func<T, bool> predicate, string lazyIncludeString);
        IQueryable<T> FindByExp(Expression<Func<T, bool>> predicate, string lazyIncludeString);
        
    }
}
